<!DOCTYPE html>
<html>
	<head>
		<!-- 设置浏览器不缓存 -->
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
		<META HTTP-EQUIV="expires" CONTENT="0">
		<!-- Content-Type -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<!-- Favicon -->
		<link rel="shortcut icon" href="./images/logo.png">
		<title>企业服务共享中心-试卷</title>
		<!--stylesheets-->
		<link rel="stylesheet" href="./plugins/element/index.css">
		<script src="./plugins/vue/vue.js"></script>
		<script src="./plugins/element/index.js"></script>
		<script src="./plugins/vue/clipboard.js"></script>
		<script src="./plugins/axios/axios.min.js"></script>
		<script src="./js/common/public.js?v=0.8.0.3"></script>
		<!-- 自定义样式表 -->
		<link rel="stylesheet" href="./css/base.css?v=0.8.0.3">
	</head>
	<style type="text/css">
		.el-range-editor.el-input__inner {
			width: 200px;
		}

		.el-range-editor .el-range-input {
			width: 80px;
		}



		.el-form-item__datetimestyle .el-form-item__label {
			width: 50%;
		}


		.el-form-item__baseinfo .el-form-item__label {
			width: 50%;
		}

		.el-form-item__allbaseinfo .el-form-item__label {
			width: 100%;
		}

		.el-table .warning-row {
			background: oldlace;
		}

		.el-table .success-row {
			background: #f0f9eb;
		}
	</style>
	<body>
		<div id="app">
			<template>
				<el-container class="maincontainer">
					<el-container class="submaincontainer">
						<el-card class="box-card" style="position:relative;width:330px" shadow="never" v-show="leftbar_show">
							<div style="position:absolute;left:0;top:0;right:0;bottom:0;overflow-y:auto;overflow-x:hidden;padding-left: 20px;padding-top: 20px;padding-right: 20px;">
								<el-form :model="queryForm" ref="queryForm">
									<el-form-item label="考试名称" prop="testName">
										<el-input v-model="queryForm.testName" maxlength="18" style="width: 217px;"></el-input>
									</el-form-item>
									<el-form-item label="类型" prop="type">
										<el-select v-model="queryForm.type" placeholder="请选择" clearable>
											<el-option v-for="item in typeoptions" :key="item" :label="item" :value="item">
											</el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="员工姓名" prop="names">
										<el-select v-model="queryForm.names" filterable placeholder="请选择" multiple :disabled="localStorage.getItem('ISLEADER')!='是'">
											<el-option v-for="item in allusers" :key="item.id" :label="item.name" :value="item.name">
											</el-option>
<!-- 											<el-option v-for="item in members" :key="item.id" :label="item.name" :value="item.name">
											</el-option> -->
										</el-select>
									</el-form-item>

									<el-form-item label="姓名(只查应聘者)" prop="name">
										<el-input v-model="queryForm.name" maxlength="18" style="width: 217px;"></el-input>
									</el-form-item>
					<el-radio-group v-model="rightornotflag">
						<el-form-item label="仅显示错题" prop="rightornotflag">
						  <el-radio label="对" >是</el-radio>
						  <el-radio label="全选" >否</el-radio>
						</el-form-item>
					</el-radio-group>
									<el-form-item label="添加时间" prop="addTime">
										<el-date-picker v-model="queryForm.addTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"
										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">
										</el-date-picker>
									</el-form-item>

									<el-form-item label="更新时间" prop="updateTime">
										<el-date-picker v-model="queryForm.updateTime" type="datetimerange" value-format="yyyy-MM-dd" :picker-options="pickerOptions"
										 range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="left">
										</el-date-picker>
									</el-form-item>

									<el-form-item>
										<el-button size="small" type="primary" @click.native.prevent="start" style="position:fixed;left:20px;bottom:5px;">查询</el-button>
									</el-form-item>
								</el-form>
							</div>
						</el-card>



		</div>
		<el-card class="box-card" style="width:100%" shadow="never">
			<div slot="header" class="clearfix">
				<i v-on:click="showLeftBar()" v-bind:class="[leftbar_show ? 'el-icon-s-fold' : 'el-icon-s-unfold']" style="color:#409EFF;cursor:pointer;"></i>
				<span>试卷列表</span>
<!-- 			<el-button-group style="float: right;margin-top:0px;">
					<el-tooltip v-for="item in toolbar" class="item" effect="dark" v-bind:content="item.content" placement="top-start">
						  <el-button size="small" v-bind:icon="item.icon" v-bind:type="item.type" >{{item.content}}</el-button>
					</el-tooltip>
			</el-button-group> -->
			</div>
			<div>
				<el-table ref="multipleTable" @select='selectionChange' :data="pagedata" tooltip-effect="dark" :height="tableHeight"
				 border highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
					<el-table-column type="selection" min-width="55">
					</el-table-column>

					<el-table-column type="expand">
						<template slot-scope="props">
							<el-form label-position="left" inline class="demo-table-expand">
								<div v-for="(item,index) in props.row.recs" v-if="item.is_right!=rightornotflag">
									<el-form-item :label="`题目${index + 1}`" style="width: 100%">
										<span>{{ item.ti_mu}}</span>
									</el-form-item>
									<el-form-item :label="`选项`" style="width: 100%">
										<!-- <span>{{ item.xuan_xiang[0].label}}</span> -->
										<el-tag v-for="i in item.xuan_xiang">{{i.label+':'+i.text}}</el-tag>
									</el-form-item>
									<el-form-item :label="`正确选项`" class="el-form-item__datetimestyle">
										<!-- <span>{{ item.rightchoose}}</span> -->
										<el-tag v-for="i in item.rightchoose">{{i}}</el-tag>
									</el-form-item>
									<el-form-item :label="`回答结果`" style="width: 50%" class="el-form-item__datetimestyle">
										<!-- <span>{{ item.answer_results}}</span> -->
										<el-tag v-for="i in item.answer_results">{{i}}</el-tag>
									</el-form-item>
									<el-form-item :label="`回答是否正确`" class="el-form-item__datetimestyle">
										<span>{{ item.is_right}}</span>
									</el-form-item>
									<el-divider></el-divider>
								</div>
			</div>
			</el-form>
			</template>
			</el-table-column>

			<el-table-column v-for="column in tablecolums" v-bind:prop="column.prop" v-bind:label="column.label"
			 v-bind:min-width="column.width" show-overflow-tooltip>
			</el-table-column>
			<el-table-column label="操作" min-width="80">
				<template slot-scope="scope">
					<!-- 					<el-link type="primary" @click="edit(scope.$index, scope.row)">编辑</el-link> -->
					<el-link type="primary" @click="remove(scope.$index, scope.row)" v-if="localStorage.getItem('ISLEADER')=='是'">删除</el-link>
					<!-- <el-link type="primary" class="cpLink" type="primary" @click="entertestlink(scope.$index, scope.row)" v-model="teamLink"
					 v-if="scope.row.state=='进行中'">进入考试</el-link> -->
					<el-link type="primary" class="cpLink" type="primary" @click="copypaperlink(scope.$index, scope.row)" v-model="teamLink"
					 v-if="scope.row.state=='进行中'">试卷链接</el-link>

				</template>
			</el-table-column>

			</el-table>


			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentPageChange" :current-page="queryForm.pageNo"
			 :page-sizes="queryForm.pagesizes" :page-size="queryForm.pagesize" background layout="total,sizes, prev, pager, next"
			 :total="pagetotal">
			</el-pagination>
			</div>
			</div>
		</el-card>
		</el-container>
		</el-container>
		<el-dialog :close-on-click-modal="false" title="试卷信息" :visible.sync="dialogFormVisible" width="550px">
			<el-form :model="testpaperForm" label-width="100px">
				<el-row :gutter="20">
					<el-col :span="16">
						<el-form-item label="类型" prop="type">
							<el-select v-model="testpaperForm.type" placeholder="请选择">
								<el-option v-for="item in typeoptions" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>

				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="题目" prop="ti_mu">
							<el-input v-model="testpaperForm.tiMu" maxlength="20"></el-input>
						</el-form-item>
					</el-col>
				</el-row>

				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="正确答案" prop="rightchoose">
							<el-input v-model="testpaperForm.rightchoose" maxlength="20"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="选项" prop="xuan_xiang">
							<el-input v-model="testpaperForm.xuanXiang" maxlength="80"></el-input>
						</el-form-item>
					</el-col>
				</el-row>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="confirm" :disabled="submitDisable">确 定</el-button>
			</div>
		</el-dialog>




		<el-dialog :close-on-click-modal="false" title="试卷信息" :visible.sync="dialogEditFormVisible" width="550px">
			<el-form :model="testpaperForm" label-width="100px" :rules="editrules" ref="testpaperForm">
				<el-row :gutter="20">
					<el-col :span="16">
						<el-form-item label="试卷类型" prop="testType">
							<el-select v-model="testpaperForm.testType" placeholder="请选择">
								<el-option v-for="item in typeoptions" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>

				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="姓名" prop="name">
							<el-input v-model="testpaperForm.name" maxlength="20"></el-input>
						</el-form-item>
					</el-col>
				</el-row>

				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="身份证" prop="identityCard">
							<el-input v-model="testpaperForm.identityCard" maxlength="20" readonly></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="得分" prop="score">
							<el-input v-model="testpaperForm.score" maxlength="80"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="通过得分" prop="passMark">
							<el-input v-model="testpaperForm.passMark" maxlength="80"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="总分" prop="totalScore">
							<el-input v-model="testpaperForm.totalScore" maxlength="80"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="20">
					<el-col :span="12">
						<el-form-item label="考试次数" prop="testNumber">
							<el-input v-model="testpaperForm.testNumber" maxlength="80"></el-input>
						</el-form-item>
					</el-col>
				</el-row>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click="dialogEditFormVisible = false">取 消</el-button>
				<el-button type="primary" @click="editconfirm" :disabled="submitDisable">确 定</el-button>
			</div>
			</template>
			</div>
	</body>

	<script src="./js/mytestpaper.js"></script>

	</script>
</html>
